#dict {
    width: 100%;
    min-height: calc(100vh - 68px - 68px);
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#dict .dict-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

#dict .dict-title {
    color: var(--font-color);
    font-weight: bolder;
    font-size: 28px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#dict .dict-subtitle {
    color: var(--seconday-font-color);
    font-size: 14px;
    margin-top: 0.5rem;
}

#dict .dict-search {
    max-width: 500px;
    margin: 1rem auto
}


/* 标签页样式 */
#dict .ant-tabs-nav {
    margin-bottom: 1rem;
}

#dict .ant-tabs-tab {
    font-size: 16px;
    font-weight: 500;
}

/* 提示词卡片网格布局 */
#dict .prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* 翻转卡片容器 */
#dict .flip-card {
    background-color: transparent;
    width: 100%;
    height: 280px;
    perspective: 1000px;
}

/* 翻转卡片内容 */
#dict .flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

/* 鼠标悬停时翻转 */
#dict .flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* 卡片正面和背面的共同样式 */
#dict .flip-card-front,
#dict .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* 卡片正面 */
#dict .flip-card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 黑夜模式下的卡片正面 */
body.dark-theme #dict .flip-card-front {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

/* 卡片背面 */
#dict .flip-card-back {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    transform: rotateY(180deg);
    justify-content: flex-start;
    text-align: left;
}

/* 黑夜模式下的卡片背面 */
body.dark-theme #dict .flip-card-back {
    background: linear-gradient(135deg, #805ad5 0%, #553c9a 100%);
}

/* 正面样式 */
#dict .card-icon {
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

#dict .card-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: white;
}

#dict .card-category {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    color: white;
}

#dict .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

#dict .card-tag {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.8rem;
}

/* 背面样式 */
#dict .back-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: white;
    text-align: center;
    width: 100%;
}

#dict .back-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    line-height: 1.4;
    color: white;
}

#dict .back-content {
    font-size: 0.8rem;
    line-height: 1.3;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    overflow: hidden;
    color: white;
}

#dict .back-actions {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
}

#dict .use-template-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-weight: bold;
    transition: all 0.3s;
    flex: 1;
}

#dict .use-template-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    transform: translateY(-2px);
}

#dict .custom-template-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    font-weight: bold;
    transition: all 0.3s;
    flex: 1;
}

#dict .custom-template-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* 分页样式 */
#dict .pagination-wrapper {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

#dict .ant-pagination-item-active {
    border-color: var(--primary-color);
}

#dict .ant-pagination-item-active a {
    color: var(--primary-color);
}

#dict .ant-modal-content .ant-modal-body .form-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
}


/* 响应式调整 */
@media (max-width: 768px) {
    #dict .prompt-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    #dict .flip-card {
        height: 260px;
    }

    #dict .flip-card-front,
    #dict .flip-card-back {
        padding: 1rem;
    }

    #dict .card-title {
        font-size: 1.3rem;
    }

    #dict .back-title {
        font-size: 1.2rem;
    }

    #dict .pagination-wrapper {
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    #dict .prompt-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    #dict .flip-card {
        height: 240px;
    }

    #dict .card-icon svg {
        font-size: 36px !important;
    }

    #dict .card-title {
        font-size: 1.2rem;
    }

    #dict .back-title {
        font-size: 1.1rem;
    }
}